/**
 * Created by user on 2018/3/20.
 */

const PREFIX = 'login_'
const LoginType = {
  change_input: PREFIX + 'change_input',
  change_error: PREFIX + 'change_error',
  change_loading: PREFIX + 'change_loading'
}

const changeInputValue = (val) => {
  return {
    type: LoginType.change_input,
    value: val
  }
}

const changeErrorText = (error) => {
  return {
    type: LoginType.change_error,
    error: error
  }
}

const changeLoading = (bool) => {
  return {
    type: LoginType.change_loading,
    loading: bool
  }
}

module.exports = {
  LoginType,
  changeInputValue,
  changeErrorText,
  changeLoading
}


